﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Gurucore.Framework.DataAccess;

namespace Gurucore.DTOGenerator.DTO
{
	[MappedTable(TableName = "INFORMATION_SCHEMA.TABLE_CONSTRAINTS", AllowTablePrefix = false, Updatable = false)]
	public class TableConstraint :DTOBase
	{
		public const string CONSTRAINT_NAME = "CONSTRAINT_NAME";
		public const string TABLE_SCHEMA = "TABLE_SCHEMA";
		public const string TABLE_NAME = "TABLE_NAME";
		public const string CONSTRAINT_TYPE = "CONSTRAINT_TYPE";

		private string m_sConstraintName;

		[MappedColumn(ColumnName = CONSTRAINT_NAME)]
		public virtual string ConstraintName
		{
			get { return m_sConstraintName; }
			set { m_sConstraintName = value; }
		}

		private string m_sTableSchema;

		[MappedColumn(ColumnName = TABLE_SCHEMA)]
		public virtual string TableSchema
		{
			get { return m_sTableSchema; }
			set { m_sTableSchema = value; }
		}

		private string m_sTableName;

		[MappedColumn(ColumnName = TABLE_NAME)]
		public virtual string TableName
		{
			get { return m_sTableName; }
			set { m_sTableName = value; }
		}

		private string m_sConstraintType;

		[MappedColumn(ColumnName = CONSTRAINT_TYPE)]
		public virtual string ConstraintType
		{
			get { return m_sConstraintType; }
			set { m_sConstraintType = value; }
		}
	}
}
